<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>多种样式的社交网站顶部导航</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    
    <style>
        /* 通用样式 */
        body {
            margin: 0;
            padding: 0;
            font-family: 'Inter', system-ui, sans-serif;
            line-height: 1.6;
        }
        
        .header-style {
            margin-bottom: 3rem;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .header-title {
            padding: 1rem;
            background-color: #f8f9fa;
            border-bottom: 1px solid #e9ecef;
            font-weight: 600;
            color: #333;
        }
        
        /* 第一套样式：经典蓝色 */
        .style-classic {
            --primary: #2563eb;
            --primary-dark: #1d4ed8;
            --secondary: #64748b;
            --light-bg: #f1f5f9;
            --dark-text: #1e293b;
            --border: #e2e8f0;
        }
        
        /* 第二套样式：现代深色 */
        .style-modern {
            --primary: #6366f1;
            --primary-dark: #4f46e5;
            --secondary: #94a3b8;
            --light-bg: #1e293b;
            --dark-text: #f8fafc;
            --border: #334155;
        }
        
        .style-modern .main-nav,
        .style-modern .logo-section {
            background-color: #0f172a;
        }
        
        .style-modern .search-bar {
            background-color: #1e293b;
        }
        
        .style-modern .search-input {
            color: #f8fafc;
        }
        
        /* 第三套样式：活力橙色 */
        .style-vibrant {
            --primary: #ea580c;
            --primary-dark: #c2410c;
            --secondary: #94a3b8;
            --light-bg: #fff7ed;
            --dark-text: #4b5563;
            --border: #fed7aa;
        }
        
        /* 第四套样式：简约灰色 */
        .style-minimal {
            --primary: #6b7280;
            --primary-dark: #4b5563;
            --secondary: #9ca3af;
            --light-bg: #f3f4f6;
            --dark-text: #1f2937;
            --border: #e5e7eb;
        }
        
        /* 第一排：快捷链接 */
        .top-links {
            background-color: var(--light-bg);
            border-bottom: 1px solid var(--border);
            padding: 0.5rem 0;
        }
        
        .links-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .left-links, .right-links {
            display: flex;
            gap: 1.5rem;
        }
        
        .top-link {
            color: var(--secondary);
            text-decoration: none;
            font-size: 0.875rem;
            transition: color 0.2s;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        
        .top-link:hover {
            color: var(--primary);
        }
        
        /* 第二排：Logo和用户信息 */
        .logo-section {
            padding: 1rem 0;
            border-bottom: 1px solid var(--border);
            background-color: white;
        }
        
        .logo-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .logo {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
        }
        
        .logo-icon {
            font-size: 2rem;
            color: var(--primary);
        }
        
        .site-name {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary);
        }
        
        .user-actions {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .auth-btn {
            padding: 0.5rem 1rem;
            border-radius: 4px;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s;
            border: 1px solid transparent;
        }
        
        .login-btn {
            color: var(--primary);
            background-color: transparent;
            border-color: var(--primary);
        }
        
        .login-btn:hover {
            background-color: var(--primary);
            color: white;
        }
        
        .register-btn {
            color: white;
            background-color: var(--primary);
        }
        
        .register-btn:hover {
            background-color: var(--primary-dark);
            color: white;
        }
        
        .user-menu {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            color: var(--dark-text);
        }
        
        .user-avatar-placeholder {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
        }
        
        .user-name {
            font-weight: 500;
        }
        
        .user-menu-dropdown {
            font-size: 0.875rem;
            color: var(--secondary);
        }
        
        /* 第三排：栏目导航 */
        .main-nav {
            background-color: white;
            border-bottom: 1px solid var(--border);
        }
        
        .nav-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .main-menu {
            display: flex;
            gap: 1.5rem;
            margin: 0;
            padding: 0;
            list-style: none;
        }
        
        .menu-item {
            position: relative;
        }
        
        .menu-link {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem 0;
            color: var(--dark-text);
            text-decoration: none;
            font-weight: 500;
            transition: color 0.2s;
        }
        
        .menu-link:hover, .menu-link.active {
            color: var(--primary);
        }
        
        .menu-link .badge {
            position: absolute;
            top: 0.5rem;
            right: -0.75rem;
            background-color: #ef4444;
            color: white;
            font-size: 0.7rem;
            padding: 0.1rem 0.35rem;
            border-radius: 50%;
        }
        
        .search-bar {
            display: flex;
            align-items: center;
            background-color: var(--light-bg);
            border-radius: 4px;
            padding: 0.5rem 1rem;
            width: 300px;
        }
        
        .search-input {
            border: none;
            background: transparent;
            outline: none;
            flex: 1;
            margin-left: 0.5rem;
            font-size: 0.9rem;
            color: var(--dark-text);
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .search-bar {
                width: 200px;
            }
            
            .main-menu {
                gap: 1rem;
            }
        }
        
        @media (max-width: 768px) {
            .left-links, .right-links {
                gap: 1rem;
            }
            
            .top-link span {
                display: none;
            }
            
            .top-link {
                gap: 0;
            }
            
            .nav-container {
                flex-direction: column;
                padding: 0.5rem 0;
            }
            
            .search-bar {
                width: 100%;
                margin-bottom: 0.5rem;
            }
            
            .main-menu {
                flex-wrap: wrap;
                justify-content: center;
            }
        }
        
        @media (max-width: 576px) {
            .logo-container {
                flex-direction: column;
                gap: 1rem;
            }
            
            .user-actions {
                width: 100%;
                justify-content: center;
            }
            
            .main-menu {
                gap: 0.75rem;
            }
            
            .menu-link span {
                display: none;
            }
            
            .menu-link {
                padding: 0.75rem;
            }
            
            .menu-link .badge {
                top: 0;
                right: 0;
            }
        }
    </style>
</head>
<body>
    <div class="container mt-4 mb-5">
        <h1 class="text-center mb-5">多种样式的社交网站顶部导航</h1>
        
        <!-- 第一套样式：经典蓝色 -->
        <div class="header-style style-classic">
            <div class="header-title">样式一：经典蓝色风格</div>
            
            <!-- 第一排：快捷链接 -->
            <div class="top-links">
                <div class="container links-container">
                    <div class="left-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-question-circle"></i>
                            <span>帮助中心</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-info-circle"></i>
                            <span>关于我们</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-shield-alt"></i>
                            <span>隐私政策</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-file-alt"></i>
                            <span>服务条款</span>
                        </a>
                    </div>
                    
                    <div class="right-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-globe"></i>
                            <span>简体中文</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-mobile-alt"></i>
                            <span>移动版</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-envelope"></i>
                            <span>联系我们</span>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第二排：Logo和用户信息 -->
            <div class="logo-section">
                <div class="container logo-container">
                    <a href="#" class="logo">
                        <div class="logo-icon">
                            <i class="fas fa-comments"></i>
                        </div>
                        <div class="site-name">社交空间</div>
                    </a>
                    
                    <!-- 未登录状态 -->
                    <div class="user-actions" id="guest-actions-1">
                        <a href="#" class="auth-btn login-btn">登录</a>
                        <a href="#" class="auth-btn register-btn">注册</a>
                    </div>
                    
                    <!-- 登录状态 (默认隐藏) -->
                    <div class="user-actions" id="user-actions-1" style="display: none;">
                        <div class="user-menu">
                            <div class="user-avatar-placeholder">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-name">张小明</div>
                            <div class="user-menu-dropdown">
                                <i class="fas fa-chevron-down"></i>
                            </div>
                        </div>
                        <a href="#" class="auth-btn login-btn">
                            <i class="fas fa-cog"></i>
                        </a>
                        <a href="#" class="auth-btn register-btn logout-btn" data-target="1">
                            <i class="fas fa-sign-out-alt"></i>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第三排：栏目导航 -->
            <div class="main-nav">
                <div class="container nav-container">
                    <ul class="main-menu">
                        <li class="menu-item">
                            <a href="#" class="menu-link active">
                                <i class="fas fa-home"></i>
                                <span>首页</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-compass"></i>
                                <span>发现</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-users"></i>
                                <span>朋友</span>
                                <span class="badge">5</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bell"></i>
                                <span>通知</span>
                                <span class="badge">12</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bookmark"></i>
                                <span>收藏</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-th-large"></i>
                                <span>专题</span>
                            </a>
                        </li>
                    </ul>
                    
                    <div class="search-bar">
                        <i class="fas fa-search"></i>
                        <input type="text" class="search-input" placeholder="搜索内容、用户、话题...">
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 第二套样式：现代深色 -->
        <div class="header-style style-modern">
            <div class="header-title">样式二：现代深色风格</div>
            
            <!-- 第一排：快捷链接 -->
            <div class="top-links">
                <div class="container links-container">
                    <div class="left-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-headphones"></i>
                            <span>客服中心</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-info-circle"></i>
                            <span>关于平台</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-shield-alt"></i>
                            <span>隐私设置</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-file-signature"></i>
                            <span>用户协议</span>
                        </a>
                    </div>
                    
                    <div class="right-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-language"></i>
                            <span>语言</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-download"></i>
                            <span>客户端</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-flag"></i>
                            <span>反馈</span>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第二排：Logo和用户信息 -->
            <div class="logo-section">
                <div class="container logo-container">
                    <a href="#" class="logo">
                        <div class="logo-icon">
                            <i class="fas fa-connectdevelop"></i>
                        </div>
                        <div class="site-name">LinkMe</div>
                    </a>
                    
                    <!-- 未登录状态 -->
                    <div class="user-actions" id="guest-actions-2">
                        <a href="#" class="auth-btn login-btn">登录</a>
                        <a href="#" class="auth-btn register-btn">注册</a>
                    </div>
                    
                    <!-- 登录状态 (默认隐藏) -->
                    <div class="user-actions" id="user-actions-2" style="display: none;">
                        <div class="user-menu">
                            <div class="user-avatar-placeholder">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-name">李华</div>
                            <div class="user-menu-dropdown">
                                <i class="fas fa-chevron-down"></i>
                            </div>
                        </div>
                        <a href="#" class="auth-btn login-btn">
                            <i class="fas fa-cog"></i>
                        </a>
                        <a href="#" class="auth-btn register-btn logout-btn" data-target="2">
                            <i class="fas fa-sign-out-alt"></i>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第三排：栏目导航 -->
            <div class="main-nav">
                <div class="container nav-container">
                    <ul class="main-menu">
                        <li class="menu-item">
                            <a href="#" class="menu-link active">
                                <i class="fas fa-home"></i>
                                <span>首页</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-compass"></i>
                                <span>探索</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-user-friends"></i>
                                <span>人脉</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bell"></i>
                                <span>提醒</span>
                                <span class="badge">8</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bookmark"></i>
                                <span>保存</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-briefcase"></i>
                                <span>活动</span>
                            </a>
                        </li>
                    </ul>
                    
                    <div class="search-bar">
                        <i class="fas fa-search"></i>
                        <input type="text" class="search-input" placeholder="搜索...">
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 第三套样式：活力橙色 -->
        <div class="header-style style-vibrant">
            <div class="header-title">样式三：活力橙色风格</div>
            
            <!-- 第一排：快捷链接 -->
            <div class="top-links">
                <div class="container links-container">
                    <div class="left-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-question-circle"></i>
                            <span>帮助</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-info-circle"></i>
                            <span>关于</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-user-secret"></i>
                            <span>隐私</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-file-alt"></i>
                            <span>条款</span>
                        </a>
                    </div>
                    
                    <div class="right-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-globe-americas"></i>
                            <span>语言</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-mobile-alt"></i>
                            <span>APP</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-envelope-open"></i>
                            <span>联系</span>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第二排：Logo和用户信息 -->
            <div class="logo-section">
                <div class="container logo-container">
                    <a href="#" class="logo">
                        <div class="logo-icon">
                            <i class="fas fa-heart"></i>
                        </div>
                        <div class="site-name">友趣</div>
                    </a>
                    
                    <!-- 未登录状态 -->
                    <div class="user-actions" id="guest-actions-3">
                        <a href="#" class="auth-btn login-btn">登录</a>
                        <a href="#" class="auth-btn register-btn">注册</a>
                    </div>
                    
                    <!-- 登录状态 (默认隐藏) -->
                    <div class="user-actions" id="user-actions-3" style="display: none;">
                        <div class="user-menu">
                            <div class="user-avatar-placeholder">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-name">王芳</div>
                            <div class="user-menu-dropdown">
                                <i class="fas fa-chevron-down"></i>
                            </div>
                        </div>
                        <a href="#" class="auth-btn login-btn">
                            <i class="fas fa-cog"></i>
                        </a>
                        <a href="#" class="auth-btn register-btn logout-btn" data-target="3">
                            <i class="fas fa-sign-out-alt"></i>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第三排：栏目导航 -->
            <div class="main-nav">
                <div class="container nav-container">
                    <ul class="main-menu">
                        <li class="menu-item">
                            <a href="#" class="menu-link active">
                                <i class="fas fa-home"></i>
                                <span>首页</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-compass"></i>
                                <span>发现</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-users"></i>
                                <span>好友</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bell"></i>
                                <span>消息</span>
                                <span class="badge">3</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bookmark"></i>
                                <span>收藏</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-calendar-day"></i>
                                <span>动态</span>
                            </a>
                        </li>
                    </ul>
                    
                    <div class="search-bar">
                        <i class="fas fa-search"></i>
                        <input type="text" class="search-input" placeholder="搜索朋友、内容...">
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 第四套样式：简约灰色 -->
        <div class="header-style style-minimal">
            <div class="header-title">样式四：简约灰色风格</div>
            
            <!-- 第一排：快捷链接 -->
            <div class="top-links">
                <div class="container links-container">
                    <div class="left-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-question"></i>
                            <span>帮助</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-info"></i>
                            <span>关于</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-shield"></i>
                            <span>隐私</span>
                        </a>
                    </div>
                    
                    <div class="right-links">
                        <a href="#" class="top-link">
                            <i class="fas fa-globe"></i>
                            <span>语言</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-mobile"></i>
                            <span>移动版</span>
                        </a>
                        <a href="#" class="top-link">
                            <i class="fas fa-envelope"></i>
                            <span>联系</span>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第二排：Logo和用户信息 -->
            <div class="logo-section">
                <div class="container logo-container">
                    <a href="#" class="logo">
                        <div class="logo-icon">
                            <i class="fas fa-comment-alt"></i>
                        </div>
                        <div class="site-name">简聊</div>
                    </a>
                    
                    <!-- 未登录状态 -->
                    <div class="user-actions" id="guest-actions-4">
                        <a href="#" class="auth-btn login-btn">登录</a>
                        <a href="#" class="auth-btn register-btn">注册</a>
                    </div>
                    
                    <!-- 登录状态 (默认隐藏) -->
                    <div class="user-actions" id="user-actions-4" style="display: none;">
                        <div class="user-menu">
                            <div class="user-avatar-placeholder">
                                <i class="fas fa-user"></i>
                            </div>
                            <div class="user-name">赵伟</div>
                            <div class="user-menu-dropdown">
                                <i class="fas fa-chevron-down"></i>
                            </div>
                        </div>
                        <a href="#" class="auth-btn login-btn">
                            <i class="fas fa-cog"></i>
                        </a>
                        <a href="#" class="auth-btn register-btn logout-btn" data-target="4">
                            <i class="fas fa-sign-out-alt"></i>
                        </a>
                    </div>
                </div>
            </div>
            
            <!-- 第三排：栏目导航 -->
            <div class="main-nav">
                <div class="container nav-container">
                    <ul class="main-menu">
                        <li class="menu-item">
                            <a href="#" class="menu-link active">
                                <i class="fas fa-home"></i>
                                <span>首页</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-compass"></i>
                                <span>发现</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-user-friends"></i>
                                <span>朋友</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bell"></i>
                                <span>通知</span>
                                <span class="badge">7</span>
                            </a>
                        </li>
                        <li class="menu-item">
                            <a href="#" class="menu-link">
                                <i class="fas fa-bookmark"></i>
                                <span>收藏</span>
                            </a>
                        </li>
                    </ul>
                    
                    <div class="search-bar">
                        <i class="fas fa-search"></i>
                        <input type="text" class="search-input" placeholder="搜索...">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // 为每个样式的登录按钮添加事件
        for (let i = 1; i <= 4; i++) {
            document.querySelector(`#guest-actions-${i} .login-btn`).addEventListener('click', function(e) {
                e.preventDefault();
                document.getElementById(`guest-actions-${i}`).style.display = 'none';
                document.getElementById(`user-actions-${i}`).style.display = 'flex';
            });
        }
        
        // 注销按钮事件
        document.querySelectorAll('.logout-btn').forEach(btn => {
            btn.addEventListener('click', function(e) {
                e.preventDefault();
                const target = this.getAttribute('data-target');
                document.getElementById(`user-actions-${target}`).style.display = 'none';
                document.getElementById(`guest-actions-${target}`).style.display = 'flex';
            });
        });
        
        // 导航菜单激活状态切换
        document.querySelectorAll('.menu-link').forEach(link => {
            link.addEventListener('click', function(e) {
                e.preventDefault();
                // 只在当前导航栏内切换激活状态
                const navContainer = this.closest('.main-nav');
                navContainer.querySelectorAll('.menu-link').forEach(l => l.classList.remove('active'));
                this.classList.add('active');
            });
        });
        
        // 搜索功能
        document.querySelectorAll('.search-input').forEach(input => {
            input.addEventListener('keypress', function(e) {
                if (e.key === 'Enter') {
                    e.preventDefault();
                    const searchTerm = this.value.trim();
                    if (searchTerm) {
                        alert(`搜索内容: ${searchTerm}`);
                    }
                }
            });
        });
    </script>
</body>
</html>
    
